/* 自定义配置 */
:root {
	--vp-sidebar-width: 23rem;
}

@mixin before($counterName) {
	&::before {
		display: inline-block;

		min-width: 1rem;
		margin-right: 0.8rem;
		padding: 0.22rem 0;

		counter-increment: $counterName;
		content: counters($counterName, ".") ".";
	}
}

aside.VPSidebar {
	nav.nav {
		counter-reset: list-number 0;

		// 每一个具体的子项 增加标号
		.VPSidebarItem {
			.item {
				@include before(list-number);
			}
		}

		// 遇到折叠栏标记时 才认定为属于新的递归起点 开始重新计数
		.VPSidebarItem.collapsible {
			.items {
				counter-reset: list-number 0;
			}
		}
	}
}
